Add react-native-test-renderer package#42644
Closed
jackpope wants to merge 2 commits into
Closed
Conversation
Base commit: d4c3311 |
jackpope
commented
Jan 24, 2024
| '<rootDir>/packages/react-native/sdks', | ||
| '<rootDir>/packages/react-native/Libraries/Renderer', | ||
| '<rootDir>/packages/rn-tester/e2e', | ||
| '<rootDir>/packages/react-native-test-renderer/src', |
Author
There was a problem hiding this comment.
Needed to add this because the package has its own jest config and running from root fails. Is there a way to make sure these tests are run against the custom config in CI moving forward?
Contributor
|
Hey @jackpope, would you be able to import this PR, or remake it in Phabricator? A couple reasons:
|
Contributor
|
@jackpope has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The goal is to provide testing utilities that use Fabric and concurrent rendering by default to support the new RN architecture. Currently most testing is done through ReactTestRenderer, which is an overly-simplified rendering environment, non-concurrent by default, and over exposes internals. A dedicated RN environment in JS can allow for more realistic test execution.
This is the initial commit to create the
react-native-test-rendererpackage. It currently only offers a simple toJSON() method on the root of a test, which is used for snapshot unit tests. We will be iterating here to add a query interface, event handling, and more.Changelog:
[GENERAL] [ADDED] - Added react-native-test-renderer package for Fabric rendered integration tests
Test Plan:
Output: